package pack0818.a;

import sun.awt.windows.WPrinterJob;

public class School1 {
    static Printer printer = new Printer();
    //输出学校详细信息
    public String detail(){
        return "这里是学校";
    }
    //使用打印机打印教师信息
    public static void print(Teacher1 t){
        printer.print(t.detail());
    }
    //使用打印机打印学校信息
    public static void print (School1 s){
        printer.print(s.detail());
    }

    public static void main(String[] args) {
        Teacher1 mm = new Teacher1();
        School1 nn = new School1();
        print(mm);
        print(nn);
    }
}
